<template>
  <router-view v-slot="{Component}"> 
    <transition name="ani">
      <component :is="Component" class="page"></component>
    </transition>
  </router-view>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.page {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0;
  overflow: hidden;
}
.ani-enter-from {
  left: 100%;
}
.ani-enter-active, .ani-leave-active {
  transition: all 1s;
  transform-origin: center;
  overflow: hidden;
}
.ani-leave-to {
  left: -100%;
  transform: rotate(180deg) scale(0);
  opacity: 0;
}
</style>
